diff -r ac75dc03ed163839c62ea52a31c3f2fde3f084a3 -r 5f8d2fb0abebcd3325b8923319fa2f6ab6f0afee axios/Axios_settings.cs --- a/axios/Axios_settings.cs Wed Jan 02 17:08:15 2013 -0600 +++ b/axios/Axios_settings.cs Wed Jan 02 17:45:08 2013 -0600 @@ -117,6 +117,7 @@ * - Adding AddScreen method to ScreenManager to make the PlayerIndex optional (default of PlayerIndex.One) * - Adding visible flag to DrawableAxiosGameObject and SimpleDrawableAxiosGameObject * - Adding extension to mousestate (Position) to get a Vector2 object of the position + * - Added MouseAimVector to AGS - this allows you to get a vector to "shoot" with (realtive to the mouse and another object) a LinearVelocity in Farseer * */ #endregion diff -r ac75dc03ed163839c62ea52a31c3f2fde3f084a3 -r 5f8d2fb0abebcd3325b8923319fa2f6ab6f0afee axios/Engine/AxiosGameScreen.cs --- a/axios/Engine/AxiosGameScreen.cs Wed Jan 02 17:08:15 2013 -0600 +++ b/axios/Engine/AxiosGameScreen.cs Wed Jan 02 17:45:08 2013 -0600 @@ -11,7 +11,9 @@ using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using GameStateManagement; +using Microsoft.Xna.Framework.Input; using Axios.Engine.Gleed2D; +using Axios.Engine.Extensions; namespace Axios.Engine { @@ -66,6 +68,14 @@ } + public Vector2 MouseAimVector(MouseState ms, Vector2 relativeposition) + { + Vector2 ret; + ret = this.Camera.ConvertScreenToWorld(ms.Position()) - relativeposition; + ret.Normalize(); + return ret; + } + /*public void AddGameObject(T gameobject) { if (gameobject is AxiosGameObject || gameobject is AxiosUIObject) diff -r ac75dc03ed163839c62ea52a31c3f2fde3f084a3 -r 5f8d2fb0abebcd3325b8923319fa2f6ab6f0afee axios/Engine/Extensions/Camera.cs --- a/axios/Engine/Extensions/Camera.cs Wed Jan 02 17:08:15 2013 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Axios.Engine.Extensions -{ - public static class Camera - { - } -}